<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<table>
			<tr>
				<td>用户名:</td>
				<td><input name="login"></td>
			</tr>
			<tr>
				<td>密码:</td>
				<td><input name="login" type="password"></td>
			</tr>
			<tr>
				<td>性别:</td>
				<td><input list="sex">
				<datalist id="sex">
					<option value="男" selected="selected"></option>
					<option value="女"></option>
				</datalist>
				</td>
			</tr>
			<tr>
				<td>学院:</td>
				<td>
					<input list="college" name="login">
					<datalist id="college">
						<option value ="厚浦IT学院"></option>
						<option value ="城乡建筑学院"></option>
						<option value ="医学院"></option>
						<option value ="教育与艺术学院"></option>
					</datalist>
				</td>
			</tr>
			<tr>
				<td>爱好:</td>
				<td>
					<lable><input name="login" type="checkbox">睡觉</lable>
					<lable><input name="login" type="checkbox">做梦</lable>
					<lable><input name="login" type="checkbox">增重</lable>
					<lable><input name="login" type="checkbox">emo</lable>
				</td>
			</tr>
			<tr>
				<td>自我介绍:</td>
				<td><textarea name="login"></textarea></td>
			</tr>
		</table>
		<button onclick="submit_name()">name提交</button>
		<button onclick="submit_tag()">tag提交</button>
	</body>
	<script type="text/javascript">
		function submit_name(){
			var text1=document.getElementsByName('login');
			console.log(text1);
		}
		function submit_tag(){
			var text2=document.getElementsByTagName('input');
			console.log(text2);
			var text2=document.getElementsByTagName('textarea');
			console.log(text2);
		}
	</script>
</html>
